package model

type student struct {
	name  string
	score float64
}

func (stu *student) GetName() string {
	return stu.name
}

func (stu *student) SetName(name string) {
	stu.name = name
}

func (stu *student) SetScore(score float64) {
	stu.score = score
}

func (stu *student) GetScore() float64 {
	return stu.score
}

//创建学生结构体，返回结构体指针
func NewStudent(name string, score float64) *student {
	return &student{
		name:  name,
		score: score,
	}
}
